package com.songcha.module_category.ui.activity.category_detail

import android.app.Application
import com.songcha.library_base.interfaces.IApiResult
import com.songcha.library_base.mvvm.base.BaseRefreshLoadMoreViewModel
import com.songcha.library_business.bean.book.BookListBean
import com.songcha.library_business.bean.book.BookNetBean

class CategoryDetailViewModel(app: Application):BaseRefreshLoadMoreViewModel<CategoryDetailRepository,BookNetBean>(app){
    var isLoading=false
    var title=""
    var channelSubId=0
    var status:Int=0
    var wordsStart:Int=0
    var wordsEnd:Int=0

    fun getCategoryDetailBookList(){
        handleApiDataObserver(repository!!.getCategoryDetailBookList(channelSubId,currentPage,status,wordsStart,wordsEnd),object :IApiResult<BookListBean>{
            override fun onSuccess(bean: BookListBean) {
                handleDataListSuccess(bean.data.records)
            }

        },true)
    }

}